<template>
  <el-dialog
    title="待办事项"
    :visible.sync="dialogVisible"
    width="700px"
    :close-on-click-modal="false"
  >
    <div>
      <el-table
        :data="list"
        :header-cell-style="{background:'#F5F4F7'}"
        border
        fit
        stripe
        highlight-current-row
        style="width: 100%"
      >
        <el-table-column
          type="index"
          label="序号"
          width="60"
          align="center"
        />
        <el-table-column
          prop="receipttype"
          label="单据类型"
        />
        <el-table-column
          prop="itemcount"
          label="数量"
          width="80"
          align="center"
        />
      </el-table>

      <el-pagination
        background
        small
        :current-page.sync="paging.page"
        :page-sizes="[10, 20, 30, 40]"
        :page-size.sync="paging.size"
        layout="total, prev, pager, next"
        :total="paging.total"
      />
    </div>
    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
      <el-button @click="dialogVisible = false">取 消</el-button>
    </div>
  </el-dialog>

</template>
<script>
// import { getTodo } from '@/api/basic-setting/dashboard/dashboard'

export default {
  name: 'Todo',
  data() {
    return {
      dialogVisible: false,
      paging: {
        total: 0,
        page: 1,
        size: 10
      },
      list: []
    }
  },
  created() {

  },
  methods: {
    open() {
      this.dialogVisible = true
      // this.getList()
    }
    // getList() {
    //   this.$nextTick(async _ => {
    //     const res = await getTodo(this.paging.page, this.paging.size)
    //     if (res.code === 20000) {
    //       this.list = res.data.rows
    //       this.paging.total = res.data.total
    //       this.$emit('get-Num', res.data.total)
    //     }
    //   })
    // }
  }
}
</script>
<style scoped>
</style>
